home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / PInterfaces / OSAGeneric.p < prev    next >
Encoding:
Text File  |  1997-08-12  |  3.8 KB  |  116 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        OSAGeneric.p
  3.  
  4.      Contains:    AppleScript Generic Component Interfaces.
  5.  
  6.      Version:    Technology:    AppleScript 1.1
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1992-1997 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT OSAGeneric;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __OSAGENERIC__}
  28. {$SETC __OSAGENERIC__ := 1}
  29.  
  30. {$I+}
  31. {$SETC OSAGenericIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __ERRORS__}
  35. {$I Errors.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __APPLEEVENTS__}
  38. {$I AppleEvents.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __OSA__}
  41. {$I OSA.p}
  42. {$ENDC}
  43.  
  44.  
  45. {$PUSH}
  46. {$ALIGN MAC68K}
  47. {$LibExport+}
  48.  
  49. {     NOTE:    This interface defines a "generic scripting component."
  50.             The Generic Scripting Component allows automatic dispatch to a
  51.             specific scripting component that conforms to the OSA interface.
  52.             This component supports OSA, by calling AppleScript or some other 
  53.             scripting component.  Additionally it provides access to the default
  54.             and the user-prefered scripting component.
  55. }
  56.  
  57.  
  58.  
  59. CONST
  60.                                                                 {  Component version this header file describes  }
  61.     kGenericComponentVersion    = $0100;
  62.  
  63.     kGSSSelectGetDefaultScriptingComponent = $1001;
  64.     kGSSSelectSetDefaultScriptingComponent = $1002;
  65.     kGSSSelectGetScriptingComponent = $1003;
  66.     kGSSSelectGetScriptingComponentFromStored = $1004;
  67.     kGSSSelectGenericToRealID    = $1005;
  68.     kGSSSelectRealToGenericID    = $1006;
  69.     kGSSSelectOutOfRange        = $1007;
  70.  
  71.  
  72. TYPE
  73.     ScriptingComponentSelector            = OSType;
  74.     GenericID                            = OSAID;
  75. { get and set the default scripting component }
  76. FUNCTION OSAGetDefaultScriptingComponent(genericScriptingComponent: ComponentInstance; VAR scriptingSubType: ScriptingComponentSelector): OSAError;
  77.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  78.     INLINE $2F3C, $0004, $1001, $7000, $A82A;
  79.     {$ENDC}
  80. FUNCTION OSASetDefaultScriptingComponent(genericScriptingComponent: ComponentInstance; scriptingSubType: ScriptingComponentSelector): OSAError;
  81.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  82.     INLINE $2F3C, $0004, $1002, $7000, $A82A;
  83.     {$ENDC}
  84. { get a scripting component instance from its subtype code }
  85. FUNCTION OSAGetScriptingComponent(genericScriptingComponent: ComponentInstance; scriptingSubType: ScriptingComponentSelector; VAR scriptingInstance: ComponentInstance): OSAError;
  86.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  87.     INLINE $2F3C, $0008, $1003, $7000, $A82A;
  88.     {$ENDC}
  89. { get a scripting component selector (subType) from a stored script }
  90. FUNCTION OSAGetScriptingComponentFromStored(genericScriptingComponent: ComponentInstance; {CONST}VAR scriptData: AEDesc; VAR scriptingSubType: ScriptingComponentSelector): OSAError;
  91.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  92.     INLINE $2F3C, $0008, $1004, $7000, $A82A;
  93.     {$ENDC}
  94. { get a real component instance and script id from a generic id }
  95. FUNCTION OSAGenericToRealID(genericScriptingComponent: ComponentInstance; VAR theScriptID: OSAID; VAR theExactComponent: ComponentInstance): OSAError;
  96.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  97.     INLINE $2F3C, $0008, $1005, $7000, $A82A;
  98.     {$ENDC}
  99. { get a generic id from a real component instance and script id }
  100. FUNCTION OSARealToGenericID(genericScriptingComponent: ComponentInstance; VAR theScriptID: OSAID; theExactComponent: ComponentInstance): OSAError;
  101.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  102.     INLINE $2F3C, $0008, $1006, $7000, $A82A;
  103.     {$ENDC}
  104.  
  105.  
  106. {$ALIGN RESET}
  107. {$POP}
  108.  
  109. {$SETC UsingIncludes := OSAGenericIncludes}
  110.  
  111. {$ENDC} {__OSAGENERIC__}
  112.  
  113. {$IFC NOT UsingIncludes}
  114.  END.
  115. {$ENDC}
  116.